<?php
class Log_data extends Data {
	private $alias = 'admin-yueshihui-com';
	private $tb = 'log';
	
	private $cols = array('logid', 'name', 'content', 'uid', 'ip', 'created_time');
	
	/**
	 * 记录操作日志
	 * @param unknown_type $cols
	 */
	public function write($cols) {
		if(!($db = $this->connect($this->alias))) return false;
		
		if($db->insert($this->tb, $cols)) return $db->lastInsertId();
		else return false;
	}
}